package com.chinacoal.microservice.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.chinacoal.microservice.pojo.CcmsSmartleasingBuilding;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @author zhuliang
 * @version V1.0
 * @Description: 房源信息的mybatis-plus类
 * @date 2020-11-09 11：23
 */
public interface CcmsSmartleasingBuildingMapper extends BaseMapper<CcmsSmartleasingBuilding> {

    /**
     * @Description: 楼宇信息的批量修改（批量删除）
     * @author zhuliang
     * @date 2020/11/11 10:24
     */
    void updateToDeleteById(@Param("deleteSign") String deleteSign,
                            @Param("lastUpdateDate") Date lastUpdateDate,
                            @Param("pkBuildingId") String pkBuildingId,
                            @Param("lastUpdatedBy") Integer lastUpdatedBy,
                            @Param("fkPropertyCompanyId") String fkPropertyCompanyId,
                            @Param("fkAdministrativeOfficeId") String fkAdministrativeOfficeId);

    /**
     * @Description: 查询所有的楼宇名称
     * @author zhuliang
     * @date 2020/11/12 14:01
     */
    List<CcmsSmartleasingBuilding> getAllName(@Param("fkPropertyCompanyId") String fkPropertyCompanyId,
                                              @Param("fkAdministrativeOfficeId") String fkAdministrativeOfficeId);

    /**
     * @Description: 根据楼宇id查询所有的省市区街道，房间
     * @author zhuliang
     * @date 2020/11/12 14:14
     */
    CcmsSmartleasingBuilding getAllByBuildingId(@Param("fkBuildingId") String fkBuildingId,
                                                @Param("fkPropertyCompanyId") String fkPropertyCompanyId,
                                                @Param("fkAdministrativeOfficeId") String fkAdministrativeOfficeId);

    /**
     * @Description: 根据区域编号id查询所有的楼宇信息
     * @author zhuliang
     * @date 2020/12/2 18:41
     */
    List<CcmsSmartleasingBuilding> getAllByAreaNumberId(@Param("areaNumberId") String areaNumberId,
                                                        @Param("fkPropertyCompanyId") String fkPropertyCompanyId,
                                                        @Param("fkAdministrativeOfficeId") String fkAdministrativeOfficeId);

    /**
     * @Description: 根据楼宇id查询所有的信息
     * @author zhuliang
     * @date 2020/11/24 13:16
     */
    CcmsSmartleasingBuilding getBuildingById(@Param("pkBuildingId") String pkBuildingId,
                                             @Param("fkPropertyCompanyId") String fkPropertyCompanyId,
                                             @Param("fkAdministrativeOfficeId") String fkAdministrativeOfficeId);

    /**
     * @Description: 查询所有的楼宇信息带分页
     * @author zhuliang
     * @date 2020/11/24 13:35
     */
    List<CcmsSmartleasingBuilding> getAllByPage(Page<CcmsSmartleasingBuilding> toPage,
                                                @Param("fkPropertyCompanyId") String fkPropertyCompanyId,
                                                @Param("fkAdministrativeOfficeId") String fkAdministrativeOfficeId);

    /**
     * @Description: 条件查询
     * @author zhuliang
     * @date 2020/12/2 18:39
     */
    List<CcmsSmartleasingBuilding> getAllByCondition(Page<CcmsSmartleasingBuilding> toPage,
                                                     @Param("inputString") String inputString,
                                                     @Param("provinceId") String provinceId,
                                                     @Param("cityId") String cityId,
                                                     @Param("areaId") String areaId,
                                                     @Param("fkPropertyCompanyId") String fkPropertyCompanyId,
                                                     @Param("fkAdministrativeOfficeId") String fkAdministrativeOfficeId);

    /**
     * @Description: 查询数据中心需要的数据
     * @author zhuliang
     * @date 2020/12/29 15:40
     */
    List<CcmsSmartleasingBuilding> getAllByData();

    /**
     * @Description: 根据楼宇名称查询楼宇id
     * @author zhuliang
     * @date 2021/1/25 16:58
     */
    String getIdByBuildingName(@Param("buildingName") String buildingName);
}
